
import java.io.*;
import java.lang.*;

public class SCM 
{
public static void main(String args[]) throws IOException
{
           	
                Add inv=new Add();
                ReqRawMaterials req=new ReqRawMaterials();
                Display d=new Display();
		int ch=0;
		String s;
		InputStreamReader ir=new InputStreamReader(System.in);
		BufferedReader br=new BufferedReader(ir);
		
		System.out.println("S U P P L Y  C H A I N  M A N A G E M E N T    S Y S T E M");
		System.out.println("-----------------------------------------------");
		System.out.println("1. ADD NEW MPRODUCT");
		System.out.println("2. ADD NEW INVENTORY ITEM");
		System.out.println("3. INVENTORY REPORT FOR MANUFACTURING A PRODUCT");
                System.out.println("4. VIEw AVAILABLE INVENTORY ITEMS");
                System.out.println("5. VIEW MANFACTURER Product List");
                System.out.println("---------------------------------");
		System.out.println("6. Exit");
		
		while(ch!=6)
		{
			System.out.print("\n");
			System.out.print("\n Enter a choice and Press ENTER to continue[1-6]:");
			ch=Integer.parseInt(br.readLine());
			
			if(ch>6||ch<1)
			{
				System.out.println("This doesn't appear to be a valid option...!");
					
			}
			
			if(ch==1)
			{
				s="y";
				while(s.equals("y")||s.equals("Y"))
				  {
                                        inv.addMproduct();
					System.out.print("\n Add another[y/n]:");
					s=br.readLine();						
				}
				
			}
			else
			if(ch==2)
			{
				s="y";
				while(s.equals("y")||s.equals("Y"))
				{       inv.addInventoryItem();			
					System.out.print("\n Sell another[y/n]:");
					s=br.readLine();						
				}
			}
			else
			if(ch==3)
			{
                                req.invList();
						
			}
                       else if(ch==4)
                        {
                          d.aviInventory();
                        }
                       else if(ch==5)
                        {	
                          d.manfProductlist();
                         } 
		}
		System.out.println("Thanks for using this program...!");
	}
}        